package com.example.rabbitmq.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Copyright(C), 2020-2021, AmbroseCdMeng
 * FileName:    FanoutReceiverB
 * Author:      AmbroseCdMeng
 * Date:        2021/3/2 13:55
 * Description: 编写接收者B。实现广播模式
 * History:
 * <author>     <time>      <version>       <desc>
 * 作者姓名     修改时间        版本号           描述
 */
@Component
@RabbitListener(queues = "fanout.B")
public class FanoutReceiverB {
    @RabbitHandler
    public void process(String message){
        System.out.println("fanout Receiver B: " + message);
    }
}
